package com.example.circular;

import com.example.circular.bean.Husband;
import com.example.circular.bean.Wife;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:testBean
 * Package:com.example.circular
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/9-14:15
 * @Version:v1.0
 */
public class testBean {
    @Test
    public void testBean() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-dependency.xml");
        Husband husband = applicationContext.getBean("husbandBean", Husband.class);
        System.out.println(husband);
        Wife wife = applicationContext.getBean("wifeBean", Wife.class);
        System.out.println(wife);
    }
}
